
    <html>

    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
        <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
        <link rel="stylesheet" type="text/css" href="css/aui.css">
        <link rel="stylesheet" type="text/css" href="css/aui-slide.css">
        <link rel="stylesheet" type="text/css" href="css/api.css" />
        <script src="https://code.jquery.com/jquery-latest.js"></script>

    </head>
    <style>
 
    </style>

    <body>
        <div id="main" style=" height: 100%;z-index: 2; ">

        </div>

        <div class="aui-bar aui-bar-tab" id="footer" style="position: fixed;
        z-index: 999;">
            <!-- <div class="aui-bar-tab-item aui-active" tapmode>
                <i class="aui-iconfont aui-icon-home"></i>
                <li>
                    <div class="aui-bar-tab-label" onclick="openHome();">首页</div>
                </li>
            </div> -->
            <!-- <div class="aui-bar-tab-item" tapmode>
                <i class="aui-iconfont aui-icon-star"></i>
                <li>
                    <div class="aui-bar-tab-label" onclick="openYouquan()">专卖</div>
                </li>
            </div> -->
            <div class="aui-bar-tab-item" id="youq_on" tapmode>
                
                    <i class="aui-iconfont Youq_i"><div  style="display: flex;flex-direction: row;justify-content: center;" ><img src="image/shouye10.png" id="sy_logo"  style="width:1.1rem;height:1.1rem;" ></div></i>
                    
                        <div class="aui-bar-tab-label"onclick="openHome();"  >首页</div>
                    </li>
                </div>

            <div class="aui-bar-tab-item" id="youq_on" tapmode>
                
                    <i class="aui-iconfont Youq_i"><div style="display: flex;flex-direction: row;justify-content: center;" ><img src="image/zhuanmai10.png" id="zm_logo"  style="width:1.1rem;height:1.1rem;"></div></i>
                    
                        <div class="aui-bar-tab-label"onclick="openYouquan()"  >专卖</div>
                    </li>
                </div>

            <div class="aui-bar-tab-item" id="youq_on" tapmode>
                
                    <i class="aui-iconfont Youq_i"><div style="display: flex;flex-direction: row;justify-content: center;" ><img src="image/10.png" id="youq_logo"  style="width:1.1rem;height:1.1rem;"></div></i>
                    
                        <div class="aui-bar-tab-label"onclick="openYouq()"  >有圈</div>
                    </li>
                </div>

            <div class="aui-bar-tab-item" id="youq_on" tapmode>
                
                <i class="aui-iconfont Youq_i"><div style="display: flex;flex-direction: row;justify-content: center;" ><img src="image/wode10.png" id="wd_logo"  style="width:1.1rem;height:1.1rem;"></div></i>
                
                    <div class="aui-bar-tab-label" onclick="openMine()" id="my_span_span" >我的</div>
                </li>
            </div>
            <!-- <div class="aui-bar-tab-item" tapmode> -->
                <!-- <div class="aui-badge" id="message">2</div> -->
                <!-- <i class="aui-iconfont aui-icon-comment"></i>
                <li>
                    <div class="aui-bar-tab-label" onclick="openMessage()">消息</div>
                </li>
            </div> -->
            <!-- <div class="aui-bar-tab-item" tapmode>
              
                <i class="aui-iconfont aui-icon-my"></i>
                <li onclick="openMine()">
                    <div class="aui-bar-tab-label">我的</div>
                </li>

            </div> -->
            
        </div>

    </body>
    <script type="text/javascript" src="./script/api.js"></script>
    <script type="text/javascript" src="./script/SHA1.js"></script>
    <script>
      
     
      var aFooterList = $api.domAll('#footer .aui-bar-tab-item');

        apiready = function() {

            var main = $api.byId('main');
            var mainPos = $api.offset(main);
            var footer = $api.byId('footer');
            var footerPos = $api.offset(footer);
            var cou = 1;
            var changeIndexFrame = function(index) {
                for (var i = 0; i < 6; i++) {
                    if (i == index) {
                        $api.addCls(aFooterList[index], 'aui-active');
                    } else {
                        $api.removeCls(aFooterList[i], 'aui-active');
                        
                    }
                };
            }
            api.openFrame({
                name: 'home',
                url: 'html/main/home.html',
                rect: {
                    x: 0,
                    y: 0,
                    w: 'auto',
                    h: mainPos.h - footerPos.h
                },
                allowEdit: true
            });

            // 阻止首页弹动
            api.setWinAttr({
                bounces: false
            });
            // 阻止首页弹动 end


            $api.setStorage('funIndex', 0);
            window.openHome = function() {
                $('#youq_logo').attr('src','image/10.png');
                $('#sy_logo').attr('src','image/shouye11.png'); 
                $('#zm_logo').attr('src','image/zhuanmai10.png');
                $('#wd_logo').attr('src','image/wode10.png');
                 $("#my_span_span").attr("style","color:;");
                api.openFrame({
                    name: 'home',
                    url: 'html/main/home.html',
                    bounces: true,
                    rect: {
                        x: 0,
                        y: 0,
                        w: 'auto',
                        h: mainPos.h - footerPos.h
                    }
                });
                changeIndexFrame(0);
                api.closeFrameGroup({
                    name: 'group1'
                });
                api.closeFrame({
                    name: 'youquan'
                });

            };
            window.openYouquan = function() {
               
                $('#youq_logo').attr('src','image/10.png');
                $('#sy_logo').attr('src','image/shouye10.png'); 
                $('#zm_logo').attr('src','image/zhuanmai11.png');
                $('#wd_logo').attr('src','image/wode10.png');
                $("#my_span_span").attr("style","color:;");
                api.openFrame({
                    name: 'youquan',
                    url: 'html/main/youquanmian.html',
                    customRefreshHeader: 'UIPullRefreshFlash',
                    rect: {
                        x: 0,
                        y: 0,
                        w: 'auto',
                        h: mainPos.h - footerPos.h
                    },
                    pageParam: {
                        cou: cou,
                        footerPos:footerPos.h
                    }
                });
                changeIndexFrame(1);
            }
            window.openYouq = function() {
                
       if( $(this).class="aui-active"){
        
         
        $('#youq_logo').attr('src','image/11.png');
                $('#sy_logo').attr('src','image/shouye10.png'); 
                $('#zm_logo').attr('src','image/zhuanmai10.png');
                $('#wd_logo').attr('src','image/wode10.png');
                $("#my_span_span").attr("style","color:;");
                 }else{
                    $('#youq_logo').attr('src','image/11.png');
                $('#sy_logo').attr('src','image/shouye10.png'); 
                $('#zm_logo').attr('src','image/zhuanmai10.png');
                $('#wd_logo').attr('src','image/wode10.png');
                $("#my_span_span").attr("style","color:;");
                }
                   
                api.openFrame({
                    name: 'youquan',
                    url: 'html/youquan/youquan.html',
                    customRefreshHeader: 'UIPullRefreshFlash',
                    rect: {
                        x: 0,
                        y: 0,
                        w: 'auto',
                        h: mainPos.h - footerPos.h
                    },
                    pageParam: {
                        cou: cou,
                        footerPos:footerPos.h
                    }
                });
                changeIndexFrame(2);
            }
            window.openMessage = function() {
                $('#youq_logo').attr('src','image/10.png');
                api.openFrame({
                    name: 'messenger',
                    url: 'html/message/messenger.html',
                    customRefreshHeader: 'UIPullRefreshFlash',
                    rect: {
                        x: 0,
                        y: 0,
                        w: 'auto',
                        h: mainPos.h - footerPos.h
                    }
                });
                changeIndexFrame(3);
                api.closeFrameGroup({
                    name: 'group1'
                });
                api.closeFrame({
                    name: 'youquan'
                });


            };
            window.openMine = function() {
                $('#youq_logo').attr('src','image/10.png');
                $('#sy_logo').attr('src','image/shouye10.png'); 
                $('#zm_logo').attr('src','image/zhuanmai10.png');
                $('#wd_logo').attr('src','image/wode11.png');
                $("#my_span_span").attr("style","color:#ff5050;");

                api.openFrame({
                    name: 'mine',
                    url: 'html/mine/mine.html',
                    customRefreshHeader: 'UIPullRefreshFlash',
                    rect: {
                        x: 0,
                        y: 0,
                        w: 'auto',
                        h: mainPos.h - footerPos.h 
                    }
                });
                changeIndexFrame(4);
                api.closeFrameGroup({
                    name: 'group1'
                });
                api.closeFrame({
                    name: 'youquan'
                });

            }
        }
    </script>

    </html>
